package com.zhl.study.service.impl;

import com.alibaba.fastjson.JSON;
import com.zhl.study.service.Encoder;

/**
 * @description 基于json的序列化实现
 * @Author: z156940l@outlook.com
 * @className JSONEncoder
 * @Date: 2024/5/20 10:16
 */
public class JSONEncoder implements Encoder {

    @Override
    public byte[] encode(Object obj) {
        return JSON.toJSONBytes(obj);
    }
}
